		library(ggthemr)
    
    vars <- with(anes2012,data.frame(efficacy1stdpre,efficacy1revpre,efficacy2stdpre,efficacy2revpre,efficacy3stdpre,efficacy3revpre,efficacy4stdpre,efficacy4revpre,stdpre_external,revisedpre_external,stdpre_internal,revisedpre_internal,efficacy1stdpo,efficacy1revpo,efficacy2stdpo,efficacy2revpo,efficacy3stdpo,efficacy3revpo,efficacy4stdpo,efficacy4revpo,stdpo_external,revisedpo_external,stdpo_internal,revisedpo_internal))
		library(ggplot2)
		l <- data.frame(matrix(nrow=ncol(vars),ncol=2))
    for(i in 1:ncol(vars)){
		  a <- lm(anes2012$pk ~vars[,i])
		  j <- c(summary(a)$coefficients[2,1],summary(a)$coefficients[2,2])
		  l[i,] <- j
		}
    
		l$question <- c("Efficacy 1","Efficacy 1","Efficacy 2","Efficacy 2","Efficacy 3","Efficacy 3","Efficacy 4","Efficacy 4","External Index","External Index","Internal Index","Internal Index","Efficacy 1","Efficacy 1","Efficacy 2","Efficacy 2","Efficacy 3","Efficacy 3","Efficacy 4","Efficacy 4","External Index","External Index","Internal Index","Internal Index" )
		
		l$wave <- c(rep("Wave 1",12),rep("Wave 2",12))
		l$type <- as.factor(rep(c("Agree-Disagree","Construct Specific"),12))
		names(l) <- c("mean","se","question","wave","type")
		
		l$cilo <- l$mean-1.64*l$se
		l$cihi <- l$mean+1.64*l$se
		
		widea <- data.frame(l[l$type=="Agree-Disagree",],l[l$type=="Construct Specific",])
    library(ggthemr)
    ggthemr('flat', spacing = 0.5, type = 'inner',layout="scientific")
		panela <-   ggplot(l,aes(x=mean,y=type))+geom_errorbarh(aes(xmax=mean+1.64*se,xmin=mean-1.64*se),height=0,lwd=1)+geom_point(size=1,colour="black")+facet_grid(wave~question)+xlab("b coefficient")+ylab("Response Form")+ggtitle("Panel A: DV is Political Knowledge")
  				#########
		l <- data.frame(matrix(nrow=ncol(vars),ncol=2))

				for(i in 1:ncol(vars)){
		  a <- lm(anes2012$pctchance~vars[,i])
		  j <- c(summary(a)$coefficients[2,1],summary(a)$coefficients[2,2])
		  l[i,] <- j
		}
    		l$question <- c("Efficacy 1","Efficacy 1","Efficacy 2","Efficacy 2","Efficacy 3","Efficacy 3","Efficacy 4","Efficacy 4","External Index","External Index","Internal Index","Internal Index","Efficacy 1","Efficacy 1","Efficacy 2","Efficacy 2","Efficacy 3","Efficacy 3","Efficacy 4","Efficacy 4","External Index","External Index","Internal Index","Internal Index" )
		
		l$wave <- c(rep("Wave 1",12),rep("Wave 2",12))
		l$type <- as.factor(rep(c("Agree-Disagree","Construct Specific"),12))		
		names(l) <- c("mean","se","question","wave","type")
		l$cihi <- l$mean+1.64*l$se
		l$cilo <- l$mean-1.64*l$se

    panelb <- ggplot(l,aes(x=mean,y=type))+geom_errorbarh(aes(xmax=mean+1.64*se,xmin=mean-1.64*se),height=0,lwd=1)+geom_point(size=1,colour="black")+facet_grid(wave~question)+xlab("b coefficient")+ylab("Response Form")+ggtitle("Panel B: DV is R's percent chance of voting")

    wideb <- data.frame(l[l$type=="Agree-Disagree",],l[l$type=="Construct Specific",])
		

		l <- data.frame(matrix(nrow=ncol(vars),ncol=2))
		for(i in 1:ncol(vars)){
		  a <- lm(anes2012$polactivity~vars[,i])
		  j <- c(summary(a)$coefficients[2,1],summary(a)$coefficients[2,2])
		  l[i,] <- j
		}

				l$question <- c("Efficacy 1","Efficacy 1","Efficacy 2","Efficacy 2","Efficacy 3","Efficacy 3","Efficacy 4","Efficacy 4","External Index","External Index","Internal Index","Internal Index","Efficacy 1","Efficacy 1","Efficacy 2","Efficacy 2","Efficacy 3","Efficacy 3","Efficacy 4","Efficacy 4","External Index","External Index","Internal Index","Internal Index" )
		
		l$wave <- c(rep("Wave 1",12),rep("Wave 2",12))
		l$type <- as.factor(rep(c("Agree-Disagree","Construct Specific"),12))
    names(l) <- c("mean","se","question","wave","type")
		widec <- data.frame(l[l$type=="Agree-Disagree",],l[l$type=="Construct Specific",])
		
		
panelc <- ggplot(l,aes(x=mean,y=type))+geom_errorbarh(aes(xmax=mean+1.64*se,xmin=mean-1.64*se),height=0,lwd=1)+geom_point(size=1,colour="black")+facet_grid(wave~question)+xlab("b coefficient")+ylab("Response Form")+ggtitle("Panel C: DV is R's political activity")
		
		
		pdf("~//sharelatex/Much ado about acquiesence/plotvalidityall.pdf",width=12,height=8)
		multiplot(panela,panelb,panelc)
		dev.off()
